import pandas as pd
from scipy.stats import mannwhitneyu

data = pd.read_excel('预测结果与训练集对应字段分布对比.xlsx')
seqTime1, seqTime2 = data['seq_time cut'], data['predict seq_time']
throughput1, throughput2 = data['throughput cut'], data['predict throughput']

seqTime1.dropna(inplace=True)
seqTime2.dropna(inplace=True)
throughput1.dropna(inplace=True)
throughput2.dropna(inplace=True)

# 使用Mann-Whitney U检验来检验两列数据是否来自同一分布
print(mannwhitneyu(seqTime1, seqTime2))
print(mannwhitneyu(throughput1, throughput2))